using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MindFactorial.LaunchPoint.Console.Library;

namespace MindFactorial.LaunchPoint.Console
{
    /// <summary>
    /// Interaction logic for DynamicContextArea.xaml
    /// </summary>

    internal partial class DynamicContextArea : ConsoleSurface, ILabeledPanel 
    {
        public DynamicContextArea()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Display the surface
        /// </summary>
        /// <param name="presenter"></param>
        protected internal override void SetPresentationSurface(ISurfacePresenter presenter)
        {
            base.SetPresentationSurface(presenter);
            this.LayoutRoot.Child = presenter.Surface;
            this.contentLabel.Content = presenter.Label;
        }


        #region ILabeledPanel Members

        public string PanelLabel
        {
            get
            {
                return (string)contentLabel.Content;
            }
            set
            {
                this.contentLabel.Content = (string)value;
            }
        }

        #endregion
    }
}